package bit.chapter;

import com.alibaba.fastjson.JSON;

import java.util.ArrayList;
import java.util.List;

public class ChapterTest {
    public static void main(String[] args) {

        //
        List<ChapterNo> chapterNoList = new ArrayList<>();
        chapterNoList.add(new ChapterNo(10));
        chapterNoList.add(new ChapterNo(199));
        //压缩章节
        byte[] bytes = ChapterNoUtil.buildChapterList(chapterNoList);
        System.out.println(JSON.toJSONString(bytes));
        List<ChapterNo> chapterNoList2 = new ArrayList<>();
        chapterNoList2.add(new ChapterNo(1));
        //查询压缩章节中是否包含
        List<ChapterNo> subChapterNo = ChapterNoUtil.findSubChapterNo(bytes,chapterNoList2);
        System.out.println(JSON.toJSONString(subChapterNo));
    }
}
